<template>
	<view class="box">
		<!-- 我的发布 -->
		<view class="tou" :style="'padding-top:' + statusBarHeight1 + 'px'">
			<view class="imageview">
				<image class="image1" @click="fanhui" src="https://pic.bangbangtongcheng.com/static/fanhui_bai.png" />
			</view>
			<span>我的发布<span v-if="TabCur1 != 0 && activeData.length>0">({{activeData.length}})</span></span>
			<p @click="fanhui">{{text}}</p>
		</view>
		<view class="housCategory">
			<view class="item" :class="item.num == TabCur ? 'clickCur' : ''" v-for="(item, index) in list" :key="index"
				@tap="tabSelect" :data-id="item.num">
				{{ item.name }}
				<image style="width: 40rpx;height: 20rpx;"
					src="https://pic.bangbangtongcheng.com/cdc093b7dd4845af9a26a90d66515e35" mode="widthFix"
					v-if="TabCur == item.num" />
			</view>
		</view>
		<!-- #ifdef H5 || APP-PLUS -->
		<scroll-view scroll-y :style="'height:calc( 100vh - ' +statusBarHeight +'px - 96rpx - 96rpx - 98rpx )'
		" class="scrollscroll" @scrolltolower="down" refresher-background="#f5f5f5">
			<!-- #endif -->
			<!-- #ifdef MP -->
			<scroll-view scroll-y :style="'height:calc( 100vh - ' + statusBarHeight + 'px - 96rpx - 88rpx - 54rpx )'" @scrolltolower="down" refresher-background="#f5f5f5">
				<!-- #endif -->
				<view class="list" :style="width == 290?'padding-bottom:130rpx':''">
					<view class="li" v-for="(item, index) in Recommend" :key="index" @touchstart="slideBegan"
						@touchmove="inSlide" @touchend="endSlide" :data-target="'move-box-' + index">
						<radio v-if="width == 290" style="top: -47px; margin-right: 10px;" :data-index='index'
							:checked="item.active" class="radioA" @click="changeRadio">
						</radio>
						<view class="xian" :style="'width: ' + (width + 324) + 'rpx'"></view>
						<image mode="aspectFit" class="img1" :src="item.vehicleCoverPicture" @click="details(item)" />
						<template v-if="item.auditStatus == 1">
							<view class="biaoqian1" :style="width == 290 ? 'left:72rpx' : 'left:0rpx'"
								v-if="item.shelfStatus == 1 && identify !== 6">已上架
							</view>
							<view class="biaoqian2" :style="width == 290 ? 'left:72rpx' : 'left:0rpx'"
								v-if="item.shelfStatus == 0">未上架
							</view>
							<view class="biaoqian1" :style="width == 290 ? 'left:72rpx' : 'left:0rpx'"
								v-if="item.isShare == 1 && item.copyData == 0 && identify == 6">已共享
							</view>
							<view class="biaoqian1" :style="width == 290 ? 'left:72rpx' : 'left:0rpx'"
								v-if="identify == 4">已申领
							</view>
							<view class="biaoqian2" :style="width == 290 ? 'left:72rpx' : 'left:0rpx'"
								v-if="item.isShare == 2">已撤回
							</view>
							<view class="biaoqian2" :style="width == 290 ? 'left:72rpx' : 'left:0rpx'"
								v-if="item.deleteFlag == 1">已删除
							</view>
						</template>
						<image class="img3" :style="width == 290 ? 'left:72rpx' : 'left:0rpx'"
							src="https://pic.bangbangtongcheng.com/static/bbcz/yishouchu.png"
							v-if="item.saleStatus == 1" />
							<view class="li_2" style="max-width: 290rpx">
								<view class="vehicleRecom" @click="details(item)">
									<!-- <span class="tagLabel">{{item.vehicleType==1?'到店新车':'二手车'}}</span> -->
									<text>{{item.title}}</text>
									<!-- <span v-if="item.vehicleType==2">{{item.vehicleBrandModel.split('|')[0] + ' '}} {{item.vehicleBrandModel.split('|')[1]?item.vehicleBrandModel.split('|')[1] + "/":"/"}} {{item.mileage<10000?item.mileage+"公里/":(item.mileage/10000).toFixed(1)+"万公里/"}} {{item.licensingTimeYear}}</span>
									<span v-else>{{item.vehicleBrandModel.split('|')[0] + ' '}} {{item.vehicleBrandModel.split('|')[1]?item.vehicleBrandModel.split('|')[1] + "/":"/" }}
										{{item.model?item.model+'/':""}}
										{{item.bodyStructureDoors+"门"+item.bodyStructureSeat+"座"+item.bodyStructureVehicle+"车"}}</span> -->
								</view>
								<view class="price" v-if="item.vehicleType!=3">
									{{item.price}}万
								</view>
								<view class="price" v-else>
									{{item.intervalPrice}}万
								</view>
							</view>
						<view class="HousCondition">
							<text style="border-bottom: 1px solid #64B6A8;color: #64B6A8;"></text>
							<view class="status">
								<view class="item" v-if="item.shelfStatus == 1">已上架</view>
								<view class="item" v-if="item.shelfStatus == 0">已下架</view>
								<view class="item" v-if="item.saleStatus == 1">已售出</view>
								<view class="item" v-if="item.isShare == 1 && item.copyData == 0">已共享</view>
								<view class="item" v-if="item.isShare == 2">已撤回</view>
								<view class="item" v-if="item.deleteFlag == 1">已删除</view>
								<view class="item" v-if="item.copyData == 1">已申领</view>
								<view class="item" v-if="item.whetherTopHome == 0 || item.whetherRecommendedVehicle==0">
									已置顶</view>
								<img @click="del(item)" style="width: 50rpx;height:50rpx;margin-left: 20rpx;"
									src="https://pic.bangbangtongcheng.com/cf645aeb155c4005adb022f3d3e98bae">
							</view>
						</view>
						<view :class="personalLetter == 'move-box-' + index ? 'noSlide' : 'endSlide'" class="youhua"
							@touchend.stop="">
							<view @click.stop="del(item)"
								style="width: 141rpx;height: 118rpx;background-color: #EA4B4B;border-radius: 6rpx;display: flex;align-items: center;justify-content: center;">
								<img src="https://pic.bangbangtongcheng.com/fe44a1005d7941cea087d4bae0f9c6d2"
									style='width: 40rpx;height: 40rpx;'>
								<text style="color: #fff;font-size: 30rpx;margin-left: 10rpx;">删除</text>
							</view>
						</view>
						<view class="sharer-say flex" :style="'width: ' + (width + 324) + 'rpx'"
							v-if="identify == 6 || (identify == 4 && item.isShare == 1)">
							<text style="color:#999">共享者说:
                <text style="color: #333;margin-left:10rpx"> 
                  佣金
                  <text v-if="item.isFace != 1"> {{ item.commission }}元</text>
                  <text v-if="item.isFace == 1"> 面议</text>
                </text>
              </text> 
							<view class="flex" @click="openShareTips(item)">
								展开 <u-icon name="arrow-down" color="#64b6a8" size="14"></u-icon>
							</view>
						</view>
					</view>
					<view v-if="Recommend.length == 0" class="none">
						<image src="https://pic.bangbangtongcheng.com/static/none.png" mode="widthFix" />
						<view>没有更多数据了</view>
					</view>
					<view class="down" v-show="Recommend.length != 0 && !downStatus">
						没有更多了
					</view>
				</view>
			</scroll-view>

			<view class="bottomOperation" v-if="width == 290">
				<view class=""></view>
				<view class="" style="display: flex;" v-if="identify==2">
					<view class="item" @click='houseAvailableChange(0)'>上架</view>
					<view class="item" @click='houseAvailableChange(4)'>置顶</view>
					<view class="item" @click='houseAvailableChange(2)'>已售出</view>
				</view>
				<view class="" style="display: flex;" v-else-if="identify==1">
					<view class="item" @click='houseAvailableChange(4)'>置顶</view>
					<view class="item" @click='houseAvailableChange(2)'>已售出</view>
					<view class="item" @click='houseAvailableChange(1)'>下架</view>
					<view class="item" @click='houseAvailableChange(3)'>刷新</view>
				</view>
				<view class="" style="display: flex;" v-else-if="identify==5">
					<view class="item" @click='houseAvailableChange(0)'>上架</view>
					<view class="item" @click='houseAvailableChange(1)'>下架</view>
					<view class="item" @click='houseAvailableChange(4)'>置顶</view>
					<view class="item" @click='houseAvailableChange(3)'>刷新</view>
				</view>
				<view class="" style="display: flex;" v-else-if="identify==4">
					<view class="item" @click='houseAvailableChange(0)'>上架</view>
					<view class="item" @click='houseAvailableChange(1)'>下架</view>
					<view class="item" @click='houseAvailableChange(4)'>置顶</view>
					<view class="item" @click='houseAvailableChange(3)'>刷新</view>
				</view>
				<view class="" style="display: flex;" v-else-if="identify==3">
					<view class="item" @click='houseAvailableChange(2)'>已售出</view>
					<view class="item" @click='houseAvailableChange(0)'>上架</view>
					<view class="item" @click='houseAvailableChange(1)'>下架</view>
					<view class="item" @click='houseAvailableChange(5)'>取消置顶</view>
					<view class="item" @click='houseAvailableChange(3)'>刷新</view>
				</view>
				<view class="" style="display: flex;" v-else-if="identify==6">
					<view class="item" @click='houseAvailableChange(6)'>撤回共享</view>
					<view class="item" @click='houseAvailableChange(5)'>取消置顶</view>
					<view class="item" @click='houseAvailableChange(3)'>刷新</view>
				</view>
			</view>
			<view class="zbc" v-if="zbc">
				<view class="tan" style="height: 520rpx;" v-if="shouye">
					<view class="li_1">置顶信息：{{activeData.length==1?activeData[0].title:'您选择了多套房源'}}</view>
					<view class="li_2">
						<view>置顶至：</view>
						<view class="xuan">
							<picker @change="PickerChange" data-type="4" range-key="valueName" :range="type4">
								<view class="picker" style="color:#64B6A8" v-if="typeIndex4 != -1">{{type4[typeIndex4].valueName}}</view>
								<view class="picker" style="color: #64B6A8;font-size:24rpx" v-else>请选择</view>
							</picker>
						</view>
					</view>
					<view class="li_2">
						<view>置顶天数：</view>
						<view class="xuan">
							<picker @change="PickerChange" data-type='1' :range="picker">
								<view class="picker" style="color: #64B6A8" v-if="typeIndex1 != -1">{{picker[typeIndex1]}}</view>
								<view class="picker" style="color: #64B6A8;font-size:24rpx" v-else>请选择</view>
							</picker>
						</view>
					</view>
					<view class="li_3">平台规则：每天限定置顶20条次，置顶信息按时间排序</view>
					<view class="li_4" @click='guan'>取消</view>
					<view class="li_5" @click='zhiding'>确定</view>
				</view>
				<view class="shangjia" v-if="shangjia">
					<view class="li_1" v-if="typeIndex6 == 0">确定要上架当前车源吗？</view>
					<view class="li_1" v-if="typeIndex6 == 1">确定要下架当前车源吗？</view>
					<view class="li_1" v-if="typeIndex6 == 2">确定要标记为已售出？</view>
					<view class="li_2" @click="guan">取消</view>
					<view class="li_3" @click="shangjiaF">确定</view>
				</view>
			</view>

			<view class="zbc" v-if="zbc1">
				<view class="sharer-tips" v-if="showShareTips">
					<view class="tips-top flex">
						<text>共享者说:</text>
					</view>
					<view class="tips-content">
						<view class="yong-jin flex">
							佣金: <view class="">
								{{houseDetails.commission}}元
							</view>

						</view>
						<view class="yong-jin flex">
							<text>备注: </text>
							<view>{{houseDetails.commissionRemarks}} </view>
						</view>
					</view>
					<view class="tips-btn" @click="closeTips">
						确定
					</view>
				</view>
			</view>
			<uniBall></uniBall>
	</view>
</template>
<script>
	import {
		mapGetters
	} from "vuex";
	let statusBarHeight;
	//#ifdef H5
	import wxshare from "../utils/index.js";
	statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 10;
	//#endif
	// #ifdef APP-PLUS
	statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 10;
	//  #endif
	// #ifdef MP-WEIXIN
	statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 5;
	//  #endif
	export default {
		computed: {
			...mapGetters(["statusBarHeight1", "userinfo"]),
		},
		data() {
			return {
				statusBarHeight,
				width: 290,
				text: "完成",
				TabCur: 2,
				TabCur1: 1,
				zbc: false,
				zbc1: false,
				shouye: false,
				shangjia: false,
				redioCheck: "",
				list: [],
				list1: [{
						num: 2,
						name: "已通过"
					},
					{
						num: 1,
						name: "待审核"
					},
					{
						num: 3,
						name: "已拒绝"
					},
					{
						num: 4,
						name: "草稿箱"
					},
				],
				typeIndex1: -1,
				type4: [{
						valueName: "首页",
						id: "1",
					},
					{
						valueName: "车务首页",
						id: "2",
					},
				],
				typeIndex4: -1,
				type6: [{
						valueName: "上架",
						id: "1",
					},
					{
						valueName: "下架",
						id: "2",
					},
					{
						valueName: "已出租",
						id: "3",
					},
					{
						valueName: "已出售",
						id: "4",
					},
				],
				typeIndex6: -1,
				scrollLeft: 0,
				scrollLeft1: 0,
				picker: [],
				pageSize: 10,
				pageNo: 1,
				trigger: false,
				downStatus: true,
				upStatus: true,
				userInfo: uni.getStorageSync("Pduser"),
				imgUrl: this.$imgSrc,
				Recommend: [],
				transactionType: "",
				newOld: "",
				activeData: [],
				examineStatus: 2,
				curTop: 0,
				safeBottom: 0,
				// 上架房源套数
				onHousing: 10,
				identify: -1,
				personalLetter: null,
				personalHideLeft: 0,
				hideLeft: 0,
				showShareTips: false,
				zbc: false,
			};
		},
		onLoad(e) {
			for (let i = 1; i < 11; i++) {
				this.picker.push(i + "天");
			}
			this.identify = e.identify
			if (this.userInfo.isAgent == 1) {
				this.list = [{
						num: 2,
						name: "二手车"
					},
					{
						num: 1,
						name: "到店新车"
					},
				]
			} else {
				this.list = [{
					num: 2,
					name: "二手车"
				}, ]
			}
			this.getFy();
			/* #ifdef H5 */
			this.jinzhi();
			/* #endif */

		},
		onShow() {

		},
		async onPullDownRefresh() {
			this.Recommend = [];
			this.pageNo = 1;
			this.downStatus = true;
			if (this.upStatus) {
				this.trigger = true;
				await this.getFy();
			}
		},
		filters: {
			nums(val) {
				return val.toFixed(2);
			},
		},
		methods: {
			openShareTips(val) {
				this.houseDetails = val;
				this.zbc1 = true;
				this.showShareTips = true;
			},

			closeTips() {
				this.zbc1 = false;
				this.showShareTips = false;
			},
			// 通过房源操作
			houseAvailableChange(e) {
				if (this.activeData.length == 0) {
					uni.showToast({
						title: "请选择车源",
						icon: "none",
						mask: true
					});
					return;
				}
				if (e == 0) {
					this.typeIndex6 = 0;
					this.zbc = true;
					this.shangjia = true;
				} else if (e == 1) {
					this.typeIndex6 = 1;
					this.zbc = true;
					this.shangjia = true;
				} else if (e == 2) {
					this.typeIndex6 = 2;
					this.zbc = true;
					this.shangjia = true;
				} else if (e == 3) {
					// 刷新
					this.refresh()
				} else if (e == 4) {
					// 置顶
					this.zbc = true;
					this.shouye = true;
				} else if (e == 5) {
					// 取消置顶
					this.cancelzZhiding()
				} else if (e == 6) {
					// 撤回共享
					this.cancleShare()
				}
			},

			// 撤回共享
			cancleShare() {
				var idList = [];
				for (var i = 0; i < this.activeData.length; i++) {
					idList.push(this.activeData[i].id);
				}
				var ids = idList.join(",");
				uni.showModal({
					title: "",
					content: "确定撤回共享车源吗？",
					showCancel: true,
					success: (res) => {
						if (res.confirm) {
							this.$myRequest
								.post("/api/mobile/vehicleOwner/shareOrWithdrawVehicle", {
									ids: ids,
									userId: this.userInfo.id,
									isShare: 0,
								})
								.then((res) => {
									uni.showToast({
										title: res.msg,
										icon: "none",
									});
									setTimeout(() => {
										this.reload();
									}, 1000);
								});
						}
					},
				});
			},

			slideBegan(e) {
				this.touchStart = e.touches[0].pageX;
			},
			inSlide(e) {
				this.touchDirection = e.touches[0].pageX - this.touchStart > 0 ? "right" : "left";
			},
			endSlide(e) {
				if (this.touchDirection == "left") {
					this.hideLeft = '1'
					this.personalLetter = e.currentTarget.dataset.target;
				} else {
					this.personalLetter = null;
				}
				this.touchDirection = null;
				console.log(this.personalLetter)
			},
			bianji() {
			},
			jinzhi() {
				let _this = this;
				let param = window.location.href.split("#")[0];
				uni.request({
					method: "post",
					data: {
						url: param
					},
					header: {
						"content-type": "application/x-www-form-urlencoded",
					},
					url: "https://www.bangbangtongcheng.com/conven//mob/login/getJsTicket.do",
					success(re) {
						_this.jinzhifx(re.data);
					},
				});
			},
			jinzhifx(data) {
				wxshare.config({
					debug: false, //是否打开调试
					appId: data.appId, // 公众号的唯一标识
					timestamp: data.timestamp, // 生成签名的时间戳
					nonceStr: data.nonce, // ，生成签名的随机串
					signature: data.signature, // 签名
					jsApiList: ["hideMenuItems"],
				});
				// 禁止分享
				wxshare.hideMenuItems({
					// 要隐藏的菜单项，只能隐藏“传播类”和“保护类”按钮，所有menu项见附录3
					menuList: [
						"menuItem:share:appMessage",
						"menuItem:share:timeline",
						"menuItem:share:timeline",
						"menuItem:share:qq",
						"menuItem:favorite",
						"menuItem:share:QZone",
						"menuItem:openWithSafari",
					],
				});
			},
			tabSelect(e) {
				this.TabCur = e.currentTarget.dataset.id;
				this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60;
				this.Recommend = [];
				this.activeData = [];
				this.pageNo = 1;
				this.upStatus = true;
				this.trigger = false;
				this.personalLetter = null;
				this.getFy();
			},
			changeRadio(e) {
				let that = this;
				let index = e.currentTarget.dataset.index;
				this.typeIndex6 = -1;
				if (that.Recommend[index].active) {
					that.Recommend[index].active = !that.Recommend[index].active;
					var index0 = this.activeData.findIndex((item) => {
						if (that.Recommend[index].id == item.id) {
							return true;
						}
					});
					this.activeData.splice(index0, 1);
					console.log(that.activeData);
				} else {
					that.Recommend.forEach((el, index1) => {
						if (index1 == index) {
							var redioCheck = false;
							if (redioCheck) {

								uni.showToast({
									title: "只能选择相同状态的数据！",
									icon: "none",
									mask: true,
								});
								setTimeout(() => {
									that.reload();
								}, 1000);
								return;
							} else {
								that.Recommend[index1].active = !that.Recommend[index1].active;
								that.activeData.push(that.Recommend[index1]);
							}

							console.log(that.activeData);
						} else {}
					});
				}
			},
			del(item) {
				let that = this;
				uni.showModal({
					title: "",
					content: "确定删除此车源？",
					showCancel: true,
					success: (res) => {
						if (res.confirm) {
							that.$myRequest
							.post("/api/mobile/vehicleOwner/removeVehicleInformation", {
								ids: item.id,
							})
							.then((res) => {
								this.activeData = []
								uni.showToast({
									title: res.msg,
									icon: "none",
									mask: true,
								});
								this.personalLetter = null
								setTimeout(() => {
									that.auditClose()
									that.reload();
								}, 1000);
							});
						}
					},
				});
			},
			// 刷新
			refresh() {
				let that = this;
				let idList = [];
				that.activeData.forEach(v => {
					idList.push(v.id)
				})
				if (!idList.length) {
					uni.showToast({
						title: "请选择车源",
						icon: "none",
						mask: true,
					});
					return;
				}
				that.$myRequest
					.post("/api/mobile/vehicleOwner/refreshVehicle", {
						userId:this.userInfo.id,
						ids: idList.join(','),
				})
				.then((res) => {
					uni.showToast({
						title: res.msg,
						icon: "none",
						mask: true,
					});
					setTimeout(() => {
						that.reload();
					}, 1000);
				});
			},
			shangjiaF() {
				var idList = [];
				for (var i = 0; i < this.activeData.length; i++) {
					idList.push(this.activeData[i].id);
				}
				var ids = idList.join(",");
				if (this.typeIndex6==0 || this.typeIndex6==1) {
					this.$myRequest
					.post("/api/mobile/vehicleOwner/vehicleUpperOrLower",{
						ids:ids,
						userId:this.userInfo.id,
						shelfStatus:this.typeIndex6==0?"1":"0"
					})
					.then((res) => {
						this.activeData = []
						uni.showToast({
							title: res.msg,
							icon: "none",
						});
						this.guan();
						setTimeout(() => {
							this.reload();
						}, 1000);
					});
				}else if(this.typeIndex6==2){
					// 标记车辆为已售
					this.$myRequest
					.post("/api/mobile/vehicleOwner/vehicleMarkingSale",{
						ids:ids,
						userId:this.userInfo.id,
					})
					.then((res) => {
						this.activeData = []
						uni.showToast({
							title: res.msg,
							icon: "none",
						});
						this.guan();
						setTimeout(() => {
							this.reload();
						}, 1000);
					});
				}
			},
			zhiding() {
				if (Number(this.typeIndex1) + 1 <= 0) {
					uni.showToast({
						title: '请选择天数',
						icon: "none",
					});
					return
				}
				if (this.typeIndex4==-1) {
					uni.showToast({
						title: '请选择置顶位置',
						icon: "none",
					});
					return
				}
				var idList = [];
				for (var i = 0; i < this.activeData.length; i++) {
					idList.push(this.activeData[i].id);
				}
				var ids = idList.join(",");
				if (this.type4[this.typeIndex4].id==1) {
					// 置顶到大主页
					this.$myRequest
						.post("/api/mobile/vehicleOwner/vehicleToppingToBigHomePage", {
							id: ids,
							userId:this.userInfo.id,
							topSettingDays: Number(this.typeIndex1) + 1,
							whetherTopHome:0,
						})
						.then((res) => {
							uni.showToast({
								title: res.msg,
								icon: "none",
							});
							this.guan();
							setTimeout(() => {
								this.reload();
							}, 1000);
						});
				}else{
					// 置顶到车务首页
					this.$myRequest
						.post("/api/mobile/vehicleOwner/vehicleToppingToHome", {
							id: ids,
							userId:this.userInfo.id,
							topSettingDays: Number(this.typeIndex1) + 1,
							homeDisplay:0,
						})
						.then((res) => {
							uni.showToast({
								title: res.msg,
								icon: "none",
							});
							this.guan();
							setTimeout(() => {
								this.reload();
							}, 1000);
						});
				}
			},
			// 取消置顶
			cancelzZhiding() {
				var idList = [];
				for (var i = 0; i < this.activeData.length; i++) {
					idList.push(this.activeData[i].id);
				}
				var ids = idList.join(",");
				uni.showModal({
					title: "",
					content: "确定取消该房源置顶吗？",
					showCancel: true,
					success: (res) => {
						if (res.confirm) {
							this.$myRequest
								.post("/api/mobile/vehicleOwner/cancelTopping", {
									ids: ids,
									userId:this.userInfo.id
								})
								.then((res) => {
									uni.showToast({
										title: res.msg,
										icon: "none",
									});
									setTimeout(() => {
										this.reload();
									}, 1000);
								});
						}
					},
				});
			},
			getFy() {
				let that = this;
				this.upStatus = false;
				let obj={
					pageSize: this.pageSize,
					pageNo: this.pageNo,
					userId: this.userInfo.id,
					auditStatus:1,
					vehicleType:this.TabCur
				}
				if (this.identify==1) {
					obj.shelfStatus=1
				}else if(this.identify==2){
					obj.shelfStatus=0
				}else if(this.identify==3){
					obj.homeDisplay=0
				}else if(this.identify==4){
					obj.apply=1
				}else if(this.identify==5){
					obj.saleStatus=1
				}else if(this.identify==6){
					obj.isShare=1
				}
				this.$myRequest
					.get("/api/mobile/vehicleOwner/getVehicleInformationByDifferentStates",obj)
					.then((res) => {
						if (!res.vehicleInformation.pageList.length) {
							that.downStatus = false;
						}
						res.vehicleInformation.pageList.forEach(v=>{
							v.active=false
						})
						this.upStatus = true;
						this.trigger = false;
						this.Recommend = this.Recommend.concat(res.vehicleInformation.pageList);
						uni.stopPullDownRefresh();
						this.$nextTick(function() {
							uni.createSelectorQuery().in(this).select('.scrollscroll').boundingClientRect(
								result => {
									console.log('result', result)
									if (result) {
										that.curTop = result.top

									}
								}).exec();
						})
					});
			},
			reload() {
				this.Recommend = [];
				this.pageNo = 1;
				this.upStatus = true;
				this.trigger = false;
				this.activeData = [];
				this.getFy();
			},
			down() {
				if (this.downStatus) {
					this.pageNo++;
					this.getFy();
				}
			},
			shangjiaC() {
				this.zbc = true;
				this.shangjia = true;
			},
			async up() {
				this.Recommend = [];
				this.pageNo = 1;
				this.downStatus = true;
				if (this.upStatus) {
					this.trigger = true;
					await this.getFy();
				}
			},
			details(item) {
				if (this.hideLeft == 1) {
					this.hideLeft = '0';
					return
				}
				if (item.isShare!=2) {
					if(item.isShare==1 || item.copyData==1){
						uni.navigateTo({
							url: "/pages_owner/index/vehicleDetails?id=" + item.id + "&type=2"
						});
					}else{
						uni.navigateTo({
							url: "/pages_owner/index/vehicleDetails?id=" + item.id
						});
					}
				}

			},
			fanhui() {
				uni.navigateBack({
					delta: 1,
				});
			},
			PickerChange(e) {
				if (this.activeData.length == 0) {
					uni.showToast({
						title: "请选择房源",
						icon: "none",
					});
					return;
				}
				let index = e.detail.value;
				let type = e.currentTarget.dataset.type;
				if (type == 4) {
					this.typeIndex4 = index;
					this.zbc = true;
					this.shouye = true;
				} else if (type == 6) {
					this.typeIndex6 = index;
					console.log(this.typeIndex6);
					this.zbc = true;
					this.shangjia = true;
				} else if (type == 1) {
					this.typeIndex1 = index;
				}
			},
			guan() {
				this.zbc = false;
				this.shouye = false;
				this.shangjia = false;
			},
			goJuBao() {
				uni.navigateTo({
					url: `/pages_houses/housing/informer?id=${this.houseDetails.user_id}&houseId=${this.houseDetails.id}`
				})
			},
		},
	};
</script>
<style lang="less" scoped>
	/deep/ uni-radio:not([disabled]) .uni-radio-input:hover {
		border-color: #d1d1d1;
	}

	/deep/ radio .uni-radio-input {
		margin: 0;
		width: 48rpx;
		height: 48rpx;
	}

	.zbc {
		position: fixed;
		width: 100%;
		top: 0;
		bottom: 0;
		background-color: rgba(0, 0, 0, 0.3);

		.sharer-tips {
			position: absolute;
			// padding: 30rpx0;
			width: 600rpx;
			// height: 310rpx;
			background-color: #fff;
			top: 30%;
			left: 50%;
			transform: translateX(-50%);
			border-radius: 10rpx;

			.tips-top {
				padding: 45rpx 35rpx 20rpx;

				display: flex;
				justify-content: space-between;
				align-items: center;
			}

			.tips-content {
				padding: 0 35rpx;

				.yong-jin {
					margin-bottom: 10rpx;
					align-items: flex-start;
					flex-wrap: wrap;

					view {
						margin-left: 10rpx;
						width: 400rpx;
						word-wrap: break-word;word-break: break-all;
						word-break: break-all;
					}
				}
			}

			.tips-btn {
				width: 100%;
				padding: 30rpx 0;
				margin-top: 40rpx;
				text-align: center;
				background-color: #64b6a8;
				color: #fff;
			}
		}
	}

	.sharer-say {
		justify-content: space-between;
		align-items: center;
		margin-left: 72rpx;

		text {
			width: 400rpx;
			// flex: 11;
			white-space: nowrap;
			overflow: hidden;
			text-overflow: ellipsis;
		}

		view {
			// flex: 1;
			padding: 10rpx;
			color: #64b6a8;
		}
	}

	.zbc {
		position: fixed;
		width: 100%;
		top: 0;
		bottom: 0;
		background-color: rgba(0, 0, 0, 0.3);
		z-index: 99;

		.tan {
			position: absolute;
			width: 600rpx;
			height: 420rpx;
			background-color: #fff;
			top: 30%;
			left: 50%;
			transform: translateX(-50%);
			border-radius: 10rpx;
			overflow: hidden;
		
			.li_1 {
				margin-left: 32rpx;
				margin-top: 60rpx;
				font-weight: 600;
				font-size: 30rpx;
			}
		
			.li_2 {
				font-size: 30rpx;
				margin-left: 32rpx;
				margin-top: 30rpx;
		
				view {
					display: inline-block;
					font-weight: 600;
					font-size: 30rpx;
				}
		
				.xuan {
					position: relative;
					width: 180rpx;
					height: 60rpx;
					background: #ffffff;
					border: 2rpx solid #64b6a8;
					border-radius: 37rpx;
					line-height: 60rpx;
					color: #64b6a8;
					text-indent: 16rpx;
				}
		
				.xuan::before {
					position: absolute;
					top: 20rpx;
					right: 30rpx;
					content: "";
					border-color: #fff #fff #64b6a8 #fff;
					border-style: solid;
					border-width: 0rpx 8rpx 14rpx 8rpx;
					height: 0;
					width: 0;
				}
			}
		
			.li_3 {
				width: 536rpx;
				font-size: 24rpx;
				margin-left: 32rpx;
				color: #ea4b4b;
				margin-top: 40rpx;
			}
		
			.li_4 {
				position: absolute;
				font-size: 30rpx;
				width: 300rpx;
				height: 90rpx;
				background: #f2f2f2;
				bottom: 0;
				left: 0;
				text-align: center;
				line-height: 90rpx;
			}
		
			.li_5 {
				position: absolute;
				font-size: 30rpx;
				width: 300rpx;
				height: 90rpx;
				background: #64b6a8;
				bottom: 0;
				right: 0;
				text-align: center;
				line-height: 90rpx;
				color: #fff;
			}
		}

		.shangjia {
			position: absolute;
			width: 600rpx;
			height: 300rpx;
			background-color: #fff;
			border-radius: 10rpx;
			top: 30%;
			left: 50%;
			transform: translateX(-50%);

			.li_1 {
				width: 100%;
				font-size: 34rpx;
				font-weight: 600;
				margin-left: 114rpx;
				margin-top: 80rpx;
			}

			.li_2 {
				display: inline-block;
				vertical-align: top;
				width: 160rpx;
				height: 60rpx;
				background: #ffffff;
				border: 2rpx solid #64b6a8;
				border-radius: 37rpx;
				text-align: center;
				line-height: 60rpx;
				color: #64b6a8;
				margin-top: 58rpx;
				margin-left: 118rpx;
			}

			.li_3 {
				display: inline-block;
				vertical-align: top;
				width: 160rpx;
				height: 60rpx;
				background: #64b6a8;
				border-radius: 37rpx;
				text-align: center;
				line-height: 60rpx;
				color: #fff;
				margin-top: 58rpx;
				margin-left: 46rpx;
			}
		}
	}

	.noSlide {
		transform: translateX(0rpx);
		transition: 0.5s;
	}

	.endSlide {
		transform: translateX(190rpx);
	}

	.youhua {
		width: 184rpx;
		height: 216rpx;
		position: absolute;
		top: 0;
		right: -4%;
		background-color: #fff;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.box {
		width: 100%;
		// padding-bottom: 130rpx;
		background-color: #fff;
	}

	.tou {
		position: relative;
		width: 100%;
		// height: 88rpx;
		text-align: center;
		line-height: 88rpx;
		font-size: 36rpx;
		color: #fff;
		background-color: #64b6a8;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 30rpx;
		// #ifdef MP-WEIXIN
		padding-right: 210rpx;

		// #endif
		.imageview {
			width: 100rpx;
			height: 60rpx;
			display: flex;
			align-items: center;

			.image1 {
				width: 32rpx;
				height: 32rpx;
			}
		}

		p {
			width: 100rpx;
			font-size: 32rpx;
			color: #fff;
		}
	}

	.auditCheck {
		width: 750rpx;
		height: 100rpx;
		display: flex;
		align-items: center;
		border-bottom: 1px solid #e6f0ed;

		.item {
			flex: 1;
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 0 30rpx;

			text {
				font-size: 32rpx;
			}
		}
	}

	.bottomOperation {
		position: fixed;
		bottom: 0;
		left: 0;
		width: 100%;
		height: 120rpx;
		background-color: #fff;
		z-index: 100;
		box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16);
		display: flex;
		align-items: center;
		justify-content: space-between;

		.item {
			width: 126rpx;
			height: 60rpx;
			background-color: #FFFFFF;
			border-radius: 10rpx;
			border: 1px solid #64B6A8;
			color: #64B6A8;
			font-size: 28rpx;
			text-align: center;
			line-height: 60rpx;
			margin-right: 22rpx;
		}
	}

	.HousCondition {
		height: 80rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;

		.status {
			display: flex;
			align-items: center;

			.item {
				width: 96rpx;
				height: 48rpx;
				background: #FFFFFF;
				border-radius: 4rpx;
				border: 1px solid #64B6A8;
				margin-right: 10rpx;
				font-size: 24rpx;
				color: #64B6A8;
				text-align: center;
				line-height: 48rpx;
			}
		}
	}

	.housCategory {
		height: 92rpx;
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 6rpx;
		box-shadow: 0px 1px 6px 1px rgba(100, 182, 168, 0.21);

		.item {
			flex: 1;
			height: 80rpx;
			border-radius: 12rpx;
			display: flex;
			flex-direction: column;
			font-size: 28rpx;
			justify-content: center;
			align-items: center;
			font-weight: 400;
		}

		.clickCur {
			background-color: #64B6A8;
			color: #fff;
		}
	}

	.bot {
		position: fixed;
		bottom: 0;
		left: 0;
		width: 100%;
		height: 120rpx;
		background-color: #fff;
		z-index: 100;

		view {
			display: inline-block;
			position: absolute;
		}

		.bot_1 {
			left: 42rpx;
			top: 38rpx;
			font-size: 34rpx;
		}

		.bot_2 {
			right: 272rpx;
			top: 38rpx;
			font-size: 34rpx;
		}

		.bot_3 {
			width: 200rpx;
			height: 70rpx;
			background: #ffffff;
			border: 2rpx solid #64b6a8;
			color: #64b6a8;
			line-height: 68rpx;
			left: 304rpx;
			top: 25rpx;
			text-indent: 56rpx;
			border-radius: 36rpx;

			picker {
				height: 100%;
				width: 100%;

				.picker {
					left: 0;
					height: 100%;
					width: 100%;
					text-align: left;
					display: flex;
					position: relative;
					justify-content: center;
					text-indent: 0px;
				}
			}
		}

		.bot_3::before {
			position: absolute;
			top: 28rpx;
			right: 20rpx;
			content: "";
			border-color: #fff #fff #64b6a8 #fff;
			border-style: solid;
			border-width: 0rpx 8rpx 14rpx 8rpx;
			height: 0;
			width: 0;
		}

		.bot_4 {
			width: 190rpx;
			height: 70rpx;
			background: #64b6a8;
			color: #ffffff;
			line-height: 68rpx;
			left: 520rpx;
			top: 25rpx;
			text-indent: 56rpx;
			border-radius: 36rpx;

			picker {
				height: 100%;
				width: 100%;

				.picker {
					height: 100%;
					width: 100%;
					left: 0;
					text-align: left;
					display: flex;
					position: relative;
					justify-content: center;
					text-indent: 0px;
				}
			}
		}

		.bot_4::before {
			position: absolute;
			top: 28rpx;
			right: 20rpx;
			// content: "";
			border-color: #64b6a8 #64b6a8 #fff #64b6a8;
			border-style: solid;
			border-width: 0rpx 8rpx 14rpx 8rpx;
			height: 0;
			width: 0;
		}
	}

	.list {
		padding-top: 30rpx;
		margin-left: 30rpx;
		width: 720rpx;

		.tit {
			color: #333333;
			font-size: 36rpx;
			margin-bottom: 12rpx;
		}

		.li {
			position: relative;
			width: 96%;
			padding-bottom: 18rpx;
			margin-bottom: 34rpx;
			.xian {
				position: absolute;
				height: 2rpx;
				background-color: #e0e0e0;
				bottom: 0;
				right: 6rpx;
			}
			.li_2 {
					margin-left: 24rpx;
					display: inline-block;
					vertical-align: top;
					.vehicleRecom {
						font-size: 36rpx;
						line-height: 44rpx;
						font-weight: 600;
						color: #333333;
						line-height: 44rpx;
						margin-bottom: 20rpx;
						.tagLabel{
							vertical-align: top;
							background: #64B6A8;
							color: #fff;
							font-size: 24rpx;
							text-align: center;
							width: 106rpx;
							margin-right: 10rpx;
							padding: 4rpx 6rpx;
							border-radius: 4rpx;
						}
					}
			
					.price {
						font-size: 28rpx;
						font-weight: 600;
						color: #E00000;
					}
				}
			.biaoqian1 {
				position: absolute;
				width: 100rpx;
				height: 46rpx;
				font-size: 24rpx;
				font-weight: 600;
				line-height: 46rpx;
				color: #ffffff;
				z-index: 1;
				top: 0;
				text-align: center;
				background: #64b6a8;
				border-radius: 0px 0px 20rpx 0px;
			}

			.biaoqian2 {
				position: absolute;
				width: 100rpx;
				height: 46rpx;
				font-size: 24rpx;
				font-weight: 600;
				line-height: 46rpx;
				color: #ffffff;
				z-index: 1;
				top: 0;
				text-align: center;
				background: #999999;
				border-radius: 0px 0px 20rpx 0px;
			}

			.img1 {
				background-color: #f8f8f8;
				width: 300rpx;
				height: 200rpx;
			}

			.img2 {
				position: absolute;
				width: 300rpx;
				height: 200rpx;
			}

			.img3 {
				position: absolute;
				width: 300rpx;
				height: 200rpx;
			}

			.li_1 {
				position: relative;
				display: inline-block;
				vertical-align: top;
				margin-left: 24rpx;

				.tit {
					width: 100%;
					font-size: 34rpx;
					font-weight: 600;
					overflow: hidden;
					text-overflow: ellipsis;
					display: -webkit-box;
					-webkit-line-clamp: 2; //想要的行数
					-webkit-box-orient: vertical;
				}

				.jiedao {
					width: 100%;
					height: 68rpx;
					font-size: 24rpx;
					margin-bottom: 14rpx;
					color: #666666;
					overflow: hidden;
					text-overflow: ellipsis;
					display: -webkit-box;
					-webkit-line-clamp: 2; //想要的行数
					-webkit-box-orient: vertical;
				}

				.shijian {
					bottom: 4rpx;
					font-size: 26rpx;

					.ycyc {
						display: inline-block;
						width: 40px;
						overflow: hidden;
						text-overflow: ellipsis;
						white-space: nowrap;
						line-height: 12.5px;
					}
				}
			}
		}

		.li:last-child {
			border-bottom: 0rpx solid #e0e0e0;
		}
	}

	.view {
		position: relative;
		font-size: 26rpx;
		border: 0;
		color: #333333;
		margin-right: 0;

		image {
			position: absolute;
			width: 44rpx;
			height: 24rpx;
			top: 66rpx;
			left: 50%;
			transform: translateX(-50%);
		}
	}

	.cur {
		color: #64b6a8;
		border: 0;
		transform: scale(1.1);
	}

	/deep/uni-checkbox .uni-checkbox-input {
		background-color: rgba(0, 0, 0, 0);
		border: 2rpx solid #999;
	}

	/deep/uni-checkbox .wx-checkbox-input,
	/deep/uni-checkbox .uni-checkbox-input {
		width: 50rpx;
		height: 50rpx;
	}

	/deep/.uni-checkbox-input-checked {
		background-color: #64b6a8 !important;
		border: 2rpx solid #64b6a8 !important;
	}

	/deep/ uni-checkbox::before {
		font-size: 40rpx;
		margin-top: -14rpx;
		right: 6rpx !important;
	}

	.down {
		height: 60rpx;
		line-height: 60rpx;
		// border-top: 2rpx solid #d0d0d0;
		text-align: center;
	}

	.none {
		text-align: center;

		image {
			width: 430rpx;
			margin-bottom: 16rpx;
		}

		view {
			height: 40rpx;
			line-height: 40rpx;
			color: #666;
		}
	}
</style>
